package com.kuaiditu.assistant.api.kdy_api;

import com.kuaiditu.assistant.api.kdy_api.base.BaseSTResponse;

import java.util.Map;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.POST;

/**
 * Created by Eenie on 2017/8/11.
 * Email: eeniework@gmail.com
 * Des:
 */

public interface STService {


//    version: 5.7.1
//    appVersion: 5710
//    pname: androids
//    Cookie: session_id=96c9e144a324ddf092d4e7701f4a760f


    @Headers({"version: 5.7.1", "appVersion: 5710", "pname: androids"})
    @POST("api.php")
    Observable<ResponseBody> ReqData(@Header("Cookie") String session, @Body RequestBody paramRequestBody);


//    @Headers({"version: 5.7.1", "appVersion: 5710", "pname: androids"})
//    @POST("api.php")
//    Observable<BaseSTResponse> fetchData(@Header("Cookie") String session, @Body RequestBody paramRequestBody);

//    @Headers({"version: 5.7.1", "appVersion: 5710", "pname: androids"})
//    @POST("api.php")
//    @FormUrlEncoded
//    Observable<BaseSTResponse> fetchData(@Header("Cookie") String session, @Body Object request);

    @Headers({"version: 5.7.1", "appVersion: 5710", "pname: androids"})
    @POST("api.php")
    @FormUrlEncoded
    Observable<BaseSTResponse> fetchData(@Header("Cookie") String session, @FieldMap Map<String, String> params);

    @Headers({"version: 5.7.1", "appVersion: 5710", "pname: androids"})
    @POST("http://api.kuaidihelp.com/v1/Wduser/login")
    Observable<ResponseBody> login(@Header("Cookie") String session, @Body RequestBody paramRequestBody);


}
